package com.changgou.seckill.service.impl;

import com.changgou.seckill.dao.SecKillActivityMapper;
import com.changgou.seckill.pojo.SecKillActivity;
import com.changgou.seckill.service.SecKillActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class SecKillActivityServiceImpl implements SecKillActivityService {
    @Autowired
    private SecKillActivityMapper secKillActivityMapper;

    @Override
    @Transactional
    public void updateById(Integer status,Integer id) {
        secKillActivityMapper.updateById(status,id);
    }

    @Override
    @Transactional
    public void delById(Integer id) {
        secKillActivityMapper.deleteByPrimaryKey(id);
    }
}
